<template>
 <div class="page">
  <!--   <common-auth ref="commonAuth"></common-auth>-->
    <my-form ref="myForm" bind:ready="onFormReady"></my-form>
 </div>

</template>

<script>

  function waitSomeTime() {
    return new Promise(function (resolve, reject) {
      setTimeout(() => {
        console.log('waitSomeTime')
        resolve(1)
      }, 3000)
    })
  }

  let myForm

  export default {
    data() {
      let themes = $global.Variable.themeSetting

      return {
        themes,
        debugerror: '',
        currentDate: new Date().getTime(),
        isAuthed: '',
        indexIcon1: $global.R.img.indexIcon1,
        lessons: [],
        cur: {
          'course_name': '',
          'header': '', // 班主任
          'is_contain_major_oto': false, // 是否包含专业课一对一
          'is_contain_common_oto': false, // 是否包公共课课一对一
          'is_exam_result': false
        },
        bg: '',
        plansrc: 'http://oss.kaoyanvip.cn/uploads/file1545809466133.png',
        ordersrc: 'http://oss.kaoyanvip.cn/uploads/file1545809513696.png',
        teachersrc: 'http://oss.kaoyanvip.cn/uploads/file1545809430518.png',
        confirmsrc: 'http://oss.kaoyanvip.cn/uploads/file1545809532821.png',
        registersrc: 'http://oss.kaoyanvip.cn/uploads/file1545809551120.png',
        emssrc: 'http://oss.kaoyanvip.cn/uploads/file1553491212053.png',
        plan: '我的计划',
        order: '院校分析预约',
        teacher: '我的老师',
        confirm: '院校确认单',
        register: '成绩登记',
        ems: '快递查看',
      }
    },
    async onLoad() {
      let self = this
      console.log(self)
      let cacheUserInfo
      let asyncResult = await waitSomeTime()
      console.log(asyncResult)
    },
    onTabItemTap(e) {
    },
    onFormReady(e) {
      if (e.detail && e.detail.context) {
        e.detail.context.init()
      }
    },
    methods: {
      awaitPullDownRefresh() {
        wx.stopPullDownRefresh()
      },
    },
    handles: {

    }
  }
</script>

<style lang="less">
  @import "../../app.component.less";
</style>
